package com.zzw.thread;

public class DeadLock implements Runnable {

	A a = new A();
	B b = new B();

	public void init(){
		Thread.currentThread().setName("");
		a.foo(b);
		System.out.println("");
	}
	
	public void run() {
		Thread.currentThread().setName("");
		b.bar(a);
		System.out.println("");
	}
	
	public static void main(String[] args) {
		DeadLock deadLock = new DeadLock();
		new Thread(deadLock).start();
		deadLock.init();
	}
}